package com.zeny.express.framework.shared.util;

import java.net.InetAddress;
import java.net.UnknownHostException;

import org.apache.commons.lang.StringUtils;


public class InetAddressUtils {

	private static String HOST_NAME = null;
	
	public static String getHostName() {
		
		if (StringUtils.isEmpty(HOST_NAME)) {
			try {
				HOST_NAME = InetAddress.getLocalHost().getHostName();
			} catch (UnknownHostException e) { }
		}
		
		return HOST_NAME;
	}
	
}
